home *** CD-ROM | disk | FTP | other *** search
- PROGRAM real_math_demo;
-
- VAR a,b,c,d : REAL;
-
- BEGIN
- a := 3.234; {simply assigning a value}
- b := a + 1.101; {adding a constant}
- c := a + b; {summing two variables}
- d := 4.234*a*b; {multiplication}
- d := 2.3/b; {division}
- d := a - b; {subtraction}
- d := (a + b)/(12.56-b); {example of a multiple expression}
- {Pascal has no expression for
- raising a number to a power.
- It must be done with the log and
- exp functions}
- {The trigonometric functions, log functions and others are available
- as predefined routines. See pages 139 to 141 of the TURBO reference
- manual for a complete list}
-
- { It will be left up to you to print out some of the above values}
- END.